package com.mathassistant.client.view;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.HasHTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Image;
import com.mathassistant.client.presenter.ComponentAnwserPresenter.Display;

public class ComponentAnwserView extends Composite implements Display{

	private static ComponentAnwserViewUiBinder uiBinder = GWT
			.create(ComponentAnwserViewUiBinder.class);
	@UiField Label titleLabel;
	@UiField HTML contentHTML;
	@UiField Anchor inputAnwserAnchor;
	@UiField Image imageClick;

	interface ComponentAnwserViewUiBinder extends
			UiBinder<Widget, ComponentAnwserView> {
	}

	public ComponentAnwserView() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	public ComponentAnwserView(String firstName) {
		initWidget(uiBinder.createAndBindUi(this));
	}

	@Override
	public HasClickHandlers getAnchorClick() {
		// TODO Auto-generated method stub
		return inputAnwserAnchor;
	}

	@Override
	public HasClickHandlers getImageClick() {
		// TODO Auto-generated method stub
		return imageClick;
	}

	@Override
	public HasHTML getContentHTML() {
		// TODO Auto-generated method stub
		return contentHTML;
	}
	
	@Override
	public void setTileLable(String title) {
		// TODO Auto-generated method stub
		titleLabel.setText(title);
	}

	@Override
	public void setData(String html) {
		// TODO Auto-generated method stub
		contentHTML.setHTML(html);
	}

	@Override
	public Widget asWidget() {
		// TODO Auto-generated method stub
		return this;
	}
}
